/*
 * Ext JS Library 2.0
 * Copyright(c) 2006-2007, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */
function go(){
    window.location="http://www.google.co.id";
}
Ext.onReady(function(){
    // shorthand
    var Tree = Ext.tree;
    var tree = new Tree.TreePanel({
        el:'tree-div',
        autoScroll:true,
        animate:true,
        enableDD:true,
        containerScroll: true, 
        loader: new Tree.TreeLoader({
            dataUrl:'get-nodes.php'
        })
    });

    // set the root node
    var root = new Tree.AsyncTreeNode({
        text:'Menu',
        
                            children:[{
                                text:'Production Management',
                                expanded:true,
                                children:[{                                   
                                    text:'Inquiry',
                                    iconCls:'user',
                                    leaf:true,
                                    href:'/elpro/inquiry_getinquiries.do'
                                },{
                                    text:'Spdcf',
                                    iconCls:'user',
                                    leaf:true,
                                    href:'/elpro/spdcf_productionMain.do'
                             },{
                                    text:'POInternal',
                                    iconCls:'user',
                                    leaf:true,
                                    href:'/elpro/poInternal_main.do'       
                                    
                    }]}]
                                
                            
    });
    tree.setRootNode(root);

    // render the tree
    tree.render();
    root.expand();
});